| Conditions | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | const { Module } = require('module'); |
||
| 23 | function preventParentScopeModules() { |
||
| 24 | const nodeModulePaths = Module._nodeModulePaths; |
||
| 25 | |||
| 26 | Module._nodeModulePaths = function (from) { |
||
| 27 | const originalPath = nodeModulePaths.call(this, from); |
||
| 28 | |||
| 29 | |||
| 30 | return originalPath.filter(function (p) { |
||
| 31 | return isPathInside(p, ROOT_FOLDER); |
||
| 32 | }); |
||
| 33 | }; |
||
| 34 | } |
||
| 35 | |||
| 38 |